package com.wys.mall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wys.common.utils.PageUtils;
import com.wys.mall.member.entity.MemberEntity;
import com.wys.mall.member.exception.PhoneExistException;
import com.wys.mall.member.exception.UserExistException;
import com.wys.mall.member.vo.SocialUser;
import com.wys.mall.member.vo.UserLoginVo;
import com.wys.mall.member.vo.UserRegisterVo;
import org.omg.CORBA.UserException;

import java.util.Map;

/**
 * 会员
 *
 * @author charlin
 * @email 136137465@qq.com
 * @date 2021-06-09 22:51:27
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(UserRegisterVo vo);

    /**
     * 判断邮箱是否重复
     *
     * @param phone
     * @return
     */
    void checkPhoneUnique(String phone) throws PhoneExistException;

    /**
     * 判断用户名是否重复
     *
     * @param userName
     * @return
     */
    void checkUserNameUnique(String userName) throws UserExistException;

    MemberEntity login(UserLoginVo vo);

    MemberEntity login(SocialUser socialUser) throws Exception;
}

